CFLAGS= -c -Wall
CFLAGS_MAIN= -Wall -o keyGen -lcrypto -lz -D_M_IX86

SOURCE_PUBLICREADER = publicReader.c
SOURCE_KEYGEN = keyGenerator.c

DEPENDS_PUBLICREADER = $(SOURCE_PUBLICREADER)
DEPENDS_KEYGEN = $(OBJECT_KEYGEN) $(SOURCE_KEYGEN)

OBJECT_KEYGEN = ../rsa/myRsa.o  ../twofish/myTwofish2.o ../twofish/zlib_use.o ../twofish/twofish2.o ../sha2/sha2.o


.PHONY: clean

all: publicreader keyGen

clean:
	-rm -rf *.o *.*~ *.xml keyGen 

publicreader: $(DEPENDS_PUBLICREADER)
	cc $(CFLAGS) $(SOURCE_PUBLICREADER)
	
keyGen: $(DEPENDS_KEYGEN)
	cc $(SOURCE_KEYGEN) $(OBJECT_KEYGEN) $(CFLAGS_MAIN)

